package com.study.mike.spring.sample.create;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *
 * @author: yuanwl
 * @date: 2021/2/9 11:11
 */
@Component
public class BeanAutowiredTest {

    private Integer id;

    private Integer age;

    private String name;

    private List<String> skillList;

    private Map<String, String> map;

//    @Autowired
    private LoveServiceFactory loveServiceFactory;

    public BeanAutowiredTest() {
        System.err.println("BeanAutowiredTest()...");
    }

    @Autowired
    public BeanAutowiredTest(LoveServiceFactory loveServiceFactory) {
        this.loveServiceFactory = loveServiceFactory;
    }

    public BeanAutowiredTest(Integer id, Integer age, String name, Map<String, String> map, LoveServiceFactory loveServiceFactory) {
        this.id = id;
        this.age = age;
        this.name = name;
        this.map = map;
        this.loveServiceFactory = loveServiceFactory;
    }

    public BeanAutowiredTest(Integer id, String name, List<String> skillList, Map<String, String> map, LoveServiceFactory loveServiceFactory) {
        this.id = id;
        this.name = name;
        this.skillList = skillList;
        this.map = map;
        this.loveServiceFactory = loveServiceFactory;
    }

    public BeanAutowiredTest(Integer id, Integer age, String name, List<String> skillList, LoveServiceFactory loveServiceFactory) {
        this.id = id;
        this.age = age;
        this.name = name;
        this.skillList = skillList;
        this.loveServiceFactory = loveServiceFactory;
    }

    public BeanAutowiredTest(Integer id, Integer age, String name, List<String> skillList, Map<String, String> map) {
        this.id = id;
        this.age = age;
        this.name = name;
        this.skillList = skillList;
        this.map = map;
    }

    public BeanAutowiredTest(Integer id, Integer age, String name, List<String> skillList, Map<String, String> map, LoveServiceFactory loveServiceFactory) {
        this.id = id;
        this.age = age;
        this.name = name;
        this.skillList = skillList;
        this.map = map;
        this.loveServiceFactory = loveServiceFactory;
    }

//    @Autowired
    public void setLoveServiceFactory(LoveServiceFactory loveServiceFactory) {
        this.loveServiceFactory = loveServiceFactory;
        System.err.println("setLoveServiceFactory=" + loveServiceFactory);
    }

}
